#include <stdio.h>

int main() {
	int m = 0, n = 0;
	char a[40], b[40];
	gets (a);
	while (a[m] != '\0') {
		b[n] = a[m];
		m++;
		while (a[m] == b[n])
			m++;
		n++;
	}
	b[n] = '\0';
	puts(b);
}